import request from '@/utils/request'

const columnList = {
  movieName: {
    label: '电影名称',
    center: true,
    sort: true,
    show: true,
    type: 'string',
    disabled: false,
    width: 0,
    rule: () => {
      return new Error()
    }
  },
  wish: {
    label: '时长',
    center: false,
    show: true,
    sort: true,
    type: 'string',
    disabled: false,
    width: 0
  },
  showInfo: {
    label: '上映时间',
    center: false,
    show: true,
    sort: true,
    type: 'string',
    disabled: false,
    width: 0
  },
  comingTitle: {
    label: '放映时间',
    center: false,
    show: true,
    sort: true,
    type: 'string',
    disabled: false,
    width: 0
  }
}

export function page(params) {
  return request({
    url: '/server/comming/page',
    method: 'get',
    params
  })
}

export function del(id) {
  return request({
    url: '/server/comming/' + id,
    method: 'delete'
  })
}

export function add(data) {
  return request({
    url: `/server/comming/`,
    method: 'post',
    data
  })
}

export function update(data) {
  return request({
    url: `/server/comming/`,
    method: 'put',
    data
  })
}

export function columns() {
  return columnList
}

